import requests
def token(user_name,pass_word):
    data = {
    'username':(None, user_name),
    'password': (None, pass_word),
}
    url = "http://127.0.0.1:8004/api-token-auth/"
    res = requests.post(url=url, files=data, verify=False, timeout=10)
    print(res.text)